package io.chenglicun.modules.clc.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.chenglicun.common.utils.DateUtils;
import io.chenglicun.common.utils.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
* 基本信息维护
*
* @author HB 137664951@qq.com
* @since 1.0 2023-11-24
*/
@Data
@ApiModel(value = "基本信息维护")
public class ClcBaseInfoDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    private Long id;
    @ApiModelProperty(value = "总户数")
    private Integer household;
    @ApiModelProperty(value = "自然村数量")
    private Integer village;
    @ApiModelProperty(value = "户籍人口")
    private Integer domicile;
    @ApiModelProperty(value = "常住人口")
    private Integer permanent;
    @ApiModelProperty(value = "面积")
    private Integer area;
    @ApiModelProperty(value = "乡村宣传封面")
    private String villagePublicizeCover;
    @ApiModelProperty(value = "乡村宣传")
    private String villagePublicize;
    /*
    @ApiModelProperty(value = "乡村宣传列表")
    private List<String> villagePublicizeList;*/
    @ApiModelProperty(value = "积分宣传封面")
    private String integralPublicizeCover;
    @ApiModelProperty(value = "积分宣传")
    private String integralPublicize;
    @ApiModelProperty(value = "党建课堂封面")
    private String partyBuildCover;
    @ApiModelProperty(value = "党建课堂")
    private String partyBuild;
    @ApiModelProperty(value = "入党流程封面")
    private String joinPartyCover;
    @ApiModelProperty(value = "入党流程")
    private String joinParty;
    @ApiModelProperty(value = "是否默认")
    private Integer isDefault;
    @ApiModelProperty(value = "创建者")
    private Long creator;
    @ApiModelProperty(value = "创建时间")
    private Date createDate;
    @ApiModelProperty(value = "更新者")
    private Long updater;
    @ApiModelProperty(value = "更新时间")
    private Date updateDate;
    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty(value = "逻辑删除 0：未删除 1：已删除")
    private Integer isDeleted;

/*    public void buildVillagePublicize(){
        if (CollectionUtils.isNotEmpty(villagePublicizeList)){
            this.villagePublicize = JsonUtils.toJsonString(villagePublicizeList);
        }
    }

    public void buildVillagePublicizeList(){
        if (StringUtils.isNotEmpty(villagePublicize)){
            this.villagePublicizeList = JsonUtils.parseArray(villagePublicize, String.class);
        }
    }*/

}